<template>
  <div class="">
    <span v-for="(str, i) in list" :key="i">
      <label>
        <input type="checkbox" :value="str" v-model="selList" />
        {{ str }}
      </label>
    </span>

    <!-- 选中列表 -->
    <ul>
      <li v-for="(ele, i) in selList" :key="i">{{ ele }}</li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "",
  props: {},
  data() {
    return {
      list: ["科幻", "喜剧", "动漫", "冒险", "科技", "军事", "娱乐", "奇闻"],
      selList: [],
    };
  },
  created() {},
  methods: {},
  computed: {},
  watch: {},
  components: {},
};
</script>

<style scoped>
span {
  margin: 5px 10px;
}
</style>
